In this example we look at how to synchronize the motion of a shared object in various clients, so that it moves at the same time in each client.

There are two important aspects to this :

In the following example we illustrate these concepts by sharing a ball which moves in a loop. Any new client picks up the current position of the ball and then keeps in sync. Notice also that though there are local clocks we only trigger motion via the master's clock to the master and then to an RPC call.

The basic logic is as follows :

This example consists of: